﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Base;
using nspKnow;
using MarketSales;

public partial class Member_MarketSales_RcountAdd : BasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string returnUrl = Base.BasePage.Config.WebURL;
        if (Request.Form["mid"].Trim() != "" && Request.Form["mid"].Trim() != null)
        {
            if (Request.Form["rurl"].Trim() != "" && Request.Form["rurl"].Trim() != null)
            {
                returnUrl = Request.Form["rurl"].ToString();
            }

            IMarketSales ims = new RMarketSales();
            TMarketSales msInfo = ims.GateItem(int.Parse(Request.Form["mid"].ToString()));
            msInfo.rCount = msInfo.rCount + 1;
            ims.Update(msInfo);
            Response.Write("<script language='javascript' defer>alert('报名成功！');location='" + returnUrl + "'</script>");
        }
        else
        {
            Response.Write("<script language='javascript' defer>alert('参数错误！');location='" + returnUrl + "'</script>");
            return;
        }
    }
}
